{"Gtk/IMStatusStyle", "gtk-im-status-style"},
{"Gtk/Modules", "gtk-modules"},
{"Gtk/FileChooserBackend", "gtk-file-chooser-backend"},
- {"Gtk/MenuBarAccel", "gtk-menu-bar-accel"},
{"Gtk/CursorThemeName", "gtk-cursor-theme-name"},
{"Gtk/CursorThemeSize", "gtk-cursor-theme-size"},
{"Gtk/TimeoutInitial", "gtk-timeout-initial"},
GdkEventKey *event,
gpointer data)
{
- gchar *accel = NULL;
gboolean retval = FALSE;
-
- g_object_get (gtk_widget_get_settings (widget),
- "gtk-menu-bar-accel", &accel,
- NULL);
+ guint keyval = GDK_KEY_F10;
- if (accel && *accel)
+ /* FIXME this is wrong, needs to be in the global accel resolution
+ * thing, to properly consider i18n etc., but that probably requires
+ * AccelGroup changes etc.
+ */
+ if (event->keyval == keyval && event->state == 0)
{
- guint keyval = 0;
- GdkModifierType mods = 0;
-
- gtk_accelerator_parse (accel, &keyval, &mods);
+ GList *tmp_menubars = get_viewable_menu_bars (GTK_WINDOW (widget));
+ GList *menubars;
- if (keyval == 0)
- g_warning ("Failed to parse menu bar accelerator '%s'\n", accel);
+ menubars = _gtk_container_focus_sort (GTK_CONTAINER (widget), tmp_menubars,
+ GTK_DIR_TAB_FORWARD, NULL);
+ g_list_free (tmp_menubars);
- /* FIXME this is wrong, needs to be in the global accel resolution
- * thing, to properly consider i18n etc., but that probably requires
- * AccelGroup changes etc.
- */
- if (event->keyval == keyval &&
- ((event->state & gtk_accelerator_get_default_mod_mask ()) ==
- (mods & gtk_accelerator_get_default_mod_mask ())))
+ if (menubars)
{
- GList *tmp_menubars = get_viewable_menu_bars (GTK_WINDOW (widget));
- GList *menubars;
+ GtkMenuShell *menu_shell = GTK_MENU_SHELL (menubars->data);
- menubars = _gtk_container_focus_sort (GTK_CONTAINER (widget), tmp_menubars,
- GTK_DIR_TAB_FORWARD, NULL);
- g_list_free (tmp_menubars);
-
- if (menubars)
- {
- GtkMenuShell *menu_shell = GTK_MENU_SHELL (menubars->data);
-
- _gtk_menu_shell_set_keyboard_mode (menu_shell, TRUE);
- gtk_menu_shell_select_first (menu_shell, FALSE);
-
- g_list_free (menubars);
-
- retval = TRUE;
- }
+ _gtk_menu_shell_set_keyboard_mode (menu_shell, TRUE);
+ gtk_menu_shell_select_first (menu_shell, FALSE);
+
+ g_list_free (menubars);
+
+ retval = TRUE;
}
}
- g_free (accel);
-
return retval;
}
NULL);
g_assert (result == PROP_KEY_THEME_NAME);
+ /**
+ * GtkSettings:gtk-menu-bar-accel:
+ *
+ * Keybinding to activate the menu bar.
+ *
+ * Deprecated: 3.10: This setting is ignored.
+ */
result = settings_install_property_parser (class,
g_param_spec_string ("gtk-menu-bar-accel",
P_("Menu bar accelerator"),